MakeThumbnailFromPictureFile
TheMakeThumbnailFromPictureFile
function creates an 80-by-80 pixel thumbnail picture from a specified picture file (PICT file).
pascal OSErr MakeThumbnailFromPictureFile (short refNum, short colorDepth, PicHandle thumbnail, ProgressProcRecordPtr progressProc);
refNum
- Contains a file reference number for the PICT file from which the thumbnail is to be extracted.
colorDepth
Specifies the depth at which the image is likely to be viewed. If you set this parameter to 0, the Image Compression Manager determines the appropriate value for the source image. Values of 1, 2, 4, 8, 16, 24, and 32 indicate the number of bits per pixel for color images. Values of 34, 36, and 40 indicate 2-bit, 4-bit, and 8-bit grayscale, respectively, for grayscale images.thumbnail
- Contains a handle to the destination picture structure for the thumbnail image. The compressor resizes this handle for the resulting data.
progressProc
- Points to a progress function structure. During the operation, the Image Compression Manager will occasionally call a function you provide in order to report its progress (see "Progress Functions" beginning on page 3-146 for more information about progress functions). If you have not provided a progress function, set this parameter to
nil
. If you pass a value of -1, you obtain a standard progress function.RESULT CODES
File Manager errors
noErr 0 No error paramErr -50 Invalid parameter specified memFullErr -108 Not enough memory available codecAbortErr -8967 Operation aborted by the progress function